import request from '@/utils/request'

// 查询miniprogram列表
export function listMiniprogram(query) {
  return request({
    url: '/system/miniprogram/list',
    method: 'get',
    params: query
  })
}

// 查询miniprogram详细
export function getMiniprogram(id) {
  return request({
    url: '/system/miniprogram/' + id,
    method: 'get'
  })
}

// 新增miniprogram
export function addMiniprogram(data) {
  return request({
    url: '/system/miniprogram',
    method: 'post',
    data: data
  })
}

// 修改miniprogram
export function updateMiniprogram(data) {
  return request({
    url: '/system/miniprogram',
    method: 'put',
    data: data
  })
}

// 删除miniprogram
export function delMiniprogram(id) {
  return request({
    url: '/system/miniprogram/' + id,
    method: 'delete'
  })
}
